import request from '@/utils/request'

// 查询学员信息列表
export function listStudent (query) {
  return request({
    url: '/manager/student/list',
    method: 'get',
    params: query
  })
}

// 查询学员信息详细
export function getStudent (id) {
  return request({
    url: '/manager/student/' + id,
    method: 'get'
  })
}

// 获取归属人分类
export function getOwnerGroup (query) {
  return request({
    url: '/manager/student/getOwner',
    method: 'get',
    params: query
  })
}

// 新增学员信息
export function addStudent (data) {
  return request({
    url: '/manager/student',
    method: 'post',
    data: data
  })
}

//学员导入
export function importData (data) {
  return request({
    url: '/manager/student/importData',
    method: 'post',
    data: data
  })
}

// 修改学员信息
export function updateStudent (data) {
  return request({
    url: '/manager/student',
    method: 'put',
    data: data
  })
}

// 删除学员信息
export function delStudent (id) {
  return request({
    url: '/manager/student/' + id,
    method: 'delete'
  })
}

// 删除学员信息
export function getProxyInfo (ids) {
  return request({
    url: '/manager/student/getProxyInfo/' + ids,
    method: 'get'
  })
}

// 新增学员信息
export function addProxy (data) {
  return request({
    url: '/manager/student/addProxy',
    method: 'post',
    data: data
  })
}

// 新增学员信息
export function updateSale(data) {
  return request({
    url: '/manager/student/updateSale',
    method: 'post',
    data: data
  })
}